package com.kitty.game.guard.facade;

import com.kitty.game.role.model.Role;
import com.kitty.common.utils.SpringUtils;
import com.kitty.game.guard.message.ReqGuardCheer;
import com.kitty.mina.cache.SessionUtils;
import org.springframework.stereotype.Controller;
import com.kitty.mina.annotation.RequestMapping;
import com.kitty.game.chat.facade.ChatController;
import com.kitty.game.guard.service.GuardService;
import org.apache.mina.core.session.IoSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Controller
public class GuardController {
    Logger logger = LoggerFactory.getLogger(ChatController.class);

    @RequestMapping
    public void fightStatus(IoSession session, ReqGuardCheer reqGuardCheer) {
        Role role = SessionUtils.getRoleBySession(session);
        SpringUtils.getBean(GuardService.class).fightStatus(role, reqGuardCheer.getId(),reqGuardCheer.getCheer(),0);
    }
}
